<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>后台登录</title>
  <!-- 新 Bootstrap5 核心文件 -->
  <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
  <script src="/static/bootstrap/js/popper.min.js"></script>
  <script src="/static/bootstrap/js/bootstrap.min.js"></script>
  <!-- Fontawesome Font Awesome Solid + Brands -->
  <link href="/static/fontawesome/css/all.css" rel="stylesheet" />
  <!-- jquery-3.7.1 -->
  <!-- <script src="/static/jquery/jquery-3.7.1.js"></script> -->
  <!-- <script src="/static/jquery/jquery.qrcode.min.js"></script> -->
  <!-- self script and css style -->
  <script src="/static/js/md5.js"></script>
  <script src="/static/js/admin/login.js"></script>
  <link rel="stylesheet" href="/static/css/admin/login.css">
</head>

<body onload="defaultHeight();">
  <div id="main" class="container-fluid bg-secondary text-white d-flex flex-column justify-content-center">
    <div class="container w-50 p-5 border rounded">
      <form id="main-login" action="/admin/login/" method="post">
        {% csrf_token %}
        <div class="mb-3 mt-3">
          <label for="email" class="form-label">Email、Phone or Username:</label>
          <div class="input-group">
            <span class="input-group-text"><i class="fa-duotone fa-solid fa-user"></i></span>
            <input type="text" class="form-control" id="email" placeholder="Enter email" name="email">
          </div>
        </div>
        <div class="mb-3">
          <label for="pwd" class="form-label">Password:</label>
          <div class="input-group"><span class="input-group-text"><i class="fa-duotone fa-solid fa-lock"></i></span>
            <input type="password" class="form-control" id="pwd" placeholder="Enter password" name="pswd">
          </div>
        </div>
        <div class="form-check mb-3">
          <label class="form-check-label">
            <input class="form-check-input" type="checkbox" name="remember"> Remember me
          </label>
        </div>
        <button type="submit" class="btn btn-primary" onfocusin="doSubmitLogin();">Submit</button>
      </form>
      {% if rlt %}
      <div class="alert alert-danger alert-dismissible fade show mt-3">
        <strong>错误!</strong> {{ rlt }} <a href="#" class="alert-link"></a>
      </div>
      {% endif %}
    </div>
  </div>
</body>

</html>